

select 'alter table ' + name+ ' add AuditFechaCreacion datetime not null default(getdate())
GO '
from sys.objects
where type = 'U'
and name != 'sysdiagrams'

GO

select 'alter table ' + name + ' add AuditUserNameCreacion varchar(300) not null  default('''')
GO'
from sys.objects
where type = 'U'
and name != 'sysdiagrams'

GO

select 'alter table ' + name + ' add AuditFechaModificacion datetime null default(getdate())
GO'
from sys.objects
where type = 'U'
and name != 'sysdiagrams'

GO

select 'alter table ' + name + ' add AuditUserNameModificacion varchar(300) null  default('''')
GO'
from sys.objects
where type = 'U'
and name != 'sysdiagrams'

GO

select 'alter table ' + name + ' add Removed bit not null  default(0)
GO'
from sys.objects
where type = 'U'
and name != 'sysdiagrams'



